package com.sqz.mybatisplus.demo.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sqz.mybatisplus.demo.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author sqz
 * @Description: mybatisPlus测试 持久层
 * @date 2020/06/25
 */
@Mapper
public interface MybatisPlusTestMapper extends BaseMapper<User> {

    //@Insert：实现新增

    /***
     * 实现查询
     * @Select：实现查询
     * @return
     */
    @Select("select * from tb_user")
    List<User> selectAll();

    /***
     * 实现查询
     * @Select：实现查询
     * @return
     */
    @Select("select * from tb_user where password = #{pwd}")
    List<User> selectByPassword(@Param("pwd") String pwd);

    //　　@Update：实现更新

    //　　@Delete：实现删除

}
